package com.seckillpro.seckill_pro.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.seckillpro.seckill_pro.pojo.TUser;
import com.seckillpro.seckill_pro.vo.LoginVo;
import com.seckillpro.seckill_pro.vo.RegisterVo;
import com.seckillpro.seckill_pro.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lyx
 * @since 2021-03-03
 */
public interface ITUserService extends IService<TUser> {


    /**
     * 登录
     *
     * @param loginVo
     */
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据cookie获取用户
     *
     * @param tUserTicket
     * @return
     */
    TUser getUserByCookie(String tUserTicket, HttpServletRequest request, HttpServletResponse response);

    /**
     * 更新密码
     *
     * @param tUserTicket
     * @param password
     * @param request
     * @param response
     * @return
     */
    RespBean updatePassword(String tUserTicket, String password, HttpServletRequest request, HttpServletResponse response);

    /**
     * 获取全部的用户账号和密码
     *
     * @return
     */

    List<TUser> getUserAll();

    /**
     * 注册
     *
     * @param registerVo
     * @param request
     * @param response
     * @return
     */
    RespBean doRegister(RegisterVo registerVo, HttpServletRequest request, HttpServletResponse response);
}
